import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

/**
 * Small semantic analyzer for html5
 * @author Colin Murray
 * 
 */
public class MySemanticAnalyzer {

	/** list holding finished html5 */
	ArrayList<String> html5;
	
	/**
	 * constructor for MysemanticAnalyzer
	 * @param a the master list of html5
	 */
	public MySemanticAnalyzer(ArrayList<String> a) {
		html5 = a;
	}
	
	/**
	 * writes an executable html5 document
	 * @throws IOException 
	 */
	public void makeHtml5( String fname ) throws IOException {
		PrintWriter out = new PrintWriter( new FileWriter( fname.substring( 0, fname.length() - 4 ) + ".html" ) );
		for ( String str : html5 ) {
		out.print( str );
		}
		out.close();
	}
}
